<?php include "../service/util/authenticateSession.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Bảng Điều Khiển</title>
        <link rel="stylesheet" href="../stylesheet/admin-style.css" type="text/css" media="all" />
    </head>

    <body>
        <?php 
			include "header.php"; 
			include "../service/CategoryService.php";
			include "../service/ProductService.php";
			include "../service/receiptService.php";
			include "../service/userService.php";
		?>
        <!--end header-->
        <!-- Container -->
        <form action="" method="get">
            <div id="container">
                <div class="shell">
                    <br />
                    <!-- Main -->
                    <div id="main">
                        <div class="cl">&nbsp;</div>

                        <!-- Content -->
                        <div id="content">        
                            <!-- Box -->
                            <div class="box">
                                <!-- Box Head -->
                                <div class="box-head">
                                    <h2>Báo Cáo Tổng Hợp</h2>
                                </div>
                                <!-- End Box Head -->
	
                                <div class="table">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <th width="200">Tên Thông Số</th>
                                            <th>Giá Trị</th>
                                        </tr>
                                        <tr>
                                            <td>Tổng số hóa đơn:</td>
                                            <td>
                                                <?php
													$row = countAllReceipts();
                                                	echo $row["NUM"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tống số tài khoản người dùng:</td>
                                            <td>
                                                <?php
	                                                $row = countAllUsers();
                                                	echo $row["NUM"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tổng số loại sản phẩm:</td>
                                            <td>
                                                <?php
                                                	$row = countAllCategories();
                                                	echo $row["NUM"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tổng số sản phẩm:</td>
                                            <td>
                                                <?php
                                                	$row = countAllProducts();
                                                	echo $row["NUM"];
                                                ?>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <!-- End Box -->

                        </div>
                        <!-- End Content -->



                        <div class="cl">&nbsp;</div>			
                    </div>
                    <!-- Main -->
                </div>
            </div>
            <!-- End Container -->
            <!--footer-->
            <?php include "footer.php"; ?>
            <!--end footer-->
            <?php ConnectionManager::getInstance()->closeConnection(); ?>
        </form>
    </body>
</html>